﻿using System;
using EPiServer.Core;
using EPiServer.PlugIn;
using TemplateFoundation.WebControls.PropertyControls;

namespace TemplateFoundation.CustomProperties
{
    /// <summary>
    /// Used to specify a link to a contact person through a person page reference
    /// </summary>
    [Serializable]
    [PageDefinitionTypePlugIn(
        DefaultEnabled = true,
        DisplayName = "Contact person",
        Description = "Used to assign a contact person to a page"
        )]
    public class PropertyContactPerson : PropertyContact
    {
        /// <summary>
        /// Returns the control to render as the property control
        /// </summary>
        /// <returns></returns>
        public override IPropertyControl CreatePropertyControl()
        {
            return new PropertyContactControl(PropertyContactControlType.Person);
        }
    }
}
